package com.yuyou.tas.admin.mapper;

import com.yuyou.tas.service.api.admin.dto.AuthUserSectionDTO;
import com.yuyou.tas.service.api.admin.entity.AuthUserSection;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AuthUserSectionMapper {
    int deleteByPrimaryKey(Long id);

    int deleteByAuthUserId(Long authUserId);

    int insert(AuthUserSection record);

    AuthUserSection selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(AuthUserSection record);

    List<AuthUserSectionDTO> findSectionByAuthUserId(Long authUserId);

    List<AuthUserSectionDTO> findSectionByAuthUserIds(@Param(value = "authUserIds")List<Long> authUserIds);

    AuthUserSection findSectionByUserIdSubjectId(@Param(value = "authUserId") Long authUserId, @Param(value = "dataSubject") Long dataSubject);

    List<AuthUserSection> findSectionBySubjectId(Long dataSubject);

    Integer findCountByParams(@Param(value = "authUserId")Long authUserId,
                              @Param(value = "dataSubject")Long dataSubject,
                              @Param(value = "sectionId")Long sectionId);
}